<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>一号店</title>
<link href="/static/css/main.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]> 
<link href="/static/css/order_main.ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE 7]> 
<link href="/static/css/order_main.ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->
<script type="text/javascript" src="/static/js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="/static/js/jquery-imgslideshow.js"></script>
<script type="text/javascript" src="/static/js/ks-switch.js"></script>
<script type="text/javascript" src="/static/js/lib.js"></script>
<script type="text/javascript">
var timeout	= 500;
var closetimer	= 0;
var ddmenuitem	= 0;

$(document).ready(function(){
   	$('.cat_item').mousemove(function(){
		$(this).addClass('cat_item_on');
	});
	$('.cat_item').mouseleave(function(){	
		$(this).removeClass('cat_item_on');
	});
	$('#slideshow').imgSlideShow({itemclass: 'i'})
	$("#slide-qg").switchTab({titCell: "dt a", trigger: "mouseover", delayTime: 0});
	$("#s_cart_nums1").hover(function(){
		mcancelclosetime();
		if(ddmenuitem) ddmenuitem.hide();
		ddmenuitem = $(document).find("#s_cartbox");
		ddmenuitem.fadeIn();
	},function(){
		mclosetime();
	});
	$("#s_cart_nums2").hover(function(){
		mcancelclosetime();
		if(ddmenuitem) ddmenuitem.hide();
		ddmenuitem = $(document).find("#s_cartbox");
		ddmenuitem.fadeIn();
	},function(){
		mclosetime();
	});
	$("#s_cartbox").hover(function(){
		mcancelclosetime();
	},function(){
		mclosetime();
	});
	 var $cur = 1;
    var $i = 4;
    var $len = $('.hot_list>ul>li').length;
    var $pages = Math.ceil($len / $i);
    var $w = $('.hotp').width()-66;
	
    var $showbox = $('.hot_list');
    
    var $pre = $('div.left_icon');
    var $next = $('div.rgt_icon');
 	
    $pre.click(function(){
        if (!$showbox.is(':animated')) { 
            if ($cur == 1) {   
                $showbox.animate({
                    left: '-=' + $w * ($pages - 1)
                }, 500); 
                $cur = $pages; 
            }
            else { 
                $showbox.animate({
                    left: '+=' + $w
                }, 500); 
                $cur--;
            }
           
        }
    });

    $next.click(function(){
        if (!$showbox.is(':animated')) { 
            if ($cur == $pages) {  
                $showbox.animate({
                    left: 0
                }, 500); 
                $cur = 1; 
            }
            else {
                $showbox.animate({
                    left: '-=' + $w
                }, 500);
                $cur++; 
            }
            
        }
    });
    
});
function mclose()
{
	if(ddmenuitem) ddmenuitem.hide();
}
function mclosetime()
{
	closetimer = window.setTimeout(mclose, timeout);
}
function mcancelclosetime()
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}
</script>
</head>

<body>
<div id="doc">

	
	<link type="text/css" href="/static/css/order_info.css" rel="stylesheet" />
	
	<div id="s_bdw">
		<div id="s_bd">
			
			<div class="stepflow"><img src="images/stepend.gif" width="980" height="33" alt="" /></div>
			
			<div class="osuccess">
				<strong class="tit">您的订单提交成功！</strong>
				<p>我们讲为您保留订单2日，如果2日后juju美食网站仍未收到您的付款，我们将自动取消此订单。<br />商品预计到达时间：2019年12月20日，星期五，下午14:00-18:00，请您注意查收。</p>
				<div class="ddinfo">
					订单编号：{{ order_id }} <a class="blue" href="#"></a><br />用户联系方式： {{ phone }}<br />应付金额：<strong class="red">￥{{ total_amount }}</strong>
				</div>
				<p class="gopay"><a href="#"><img src="images/gopay.gif" width="88" height="36" alt="" /></a></p>
				<div class="nowgo">您现在还可以：<br /><a class="blue" href="#">返回首页</a><a class="blue" href="{{ url('shoppingcarts:carts') }}">继续购物</a><a class="blue" href="#">查看订单</a><a class="blue" id="btn_success" href="javascript:;">去支付</a></div>
			</div><!--osuccess end-->
			
			<dl style="margin-top:10px;">
				<dt>注意事项：</dt>
				<dd>1.“订单提交成功”仅表明juju美食网站收到了您的订单，只有您的订单通过审核后，才代表订单正式生效；<br />2.选择货到付款/juju美食网站的客户，请您务必认真检查所收货物，如有不符，您可以拒收；
			</dl>
			
		</div><!--s_bd end-->
	</div><!--s_bdw end-->	
	
	<div id="s_ftw">

	</div><!--s_ftw end-->

</div>
<script type="text/javascript">

{#function getCookie(name) {#}
{#    var r = document.cookie.match("\\b" + name + "=([^;]*)\\b");#}
{#    return r ? r[1] : undefined;#}
{# }#}
{##}
{#// 提取地址栏中的查询字符串#}
{#function get_query_string(name) {#}
{#    var r = window.location.search.substr(1).match(reg);#}
{#    if (r != null) {#}
{#        return decodeURI(r[2]);#}
{#    }#}
{#    return null;#}
{#    }#}




$("#btn_success").click(function () {
    alert(11111111)
    var url = window.location.search
    var order_id = url.slice(10)
    $.ajax({
        url: '/payment/?order_id=' + order_id,
        type: "GET",
        responseType: 'json',
        success: function (res) {
            if (res.code == "0") {
                // 跳转到支付宝
                window.location.href = res.alipay_url;
            } else {
                alert(res.errmsg)
            }
        }
    });
});

</script>

</body>
</html>
